package com.lee.basedao.common;

import java.io.Serializable;

import org.apache.ibatis.session.RowBounds;

public class IBSPage implements Serializable {

	private static final long serialVersionUID = -2015041412559943L;
	
	//当前页
	 private int pageNum;
	//每页的数量
	 private int pageSize;
	 //页码数量
	 private int navigatePages;
	 
	public int getPageNum() {
		return pageNum;
	}
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	
	public int getNavigatePages() {
		return navigatePages;
	}
	public void setNavigatePages(int navigatePages) {
		this.navigatePages = navigatePages;
	}
	public IBSPage() {
		super();
		initPage(0, Constant.DEAFULT_PAGE_SIZE,Constant.DEAFULT_PAGE_NAVIGATEPAGES);
	}
	public IBSPage(Integer pageNum) {
		initPage(pageNum, Constant.DEAFULT_PAGE_SIZE,Constant.DEAFULT_PAGE_NAVIGATEPAGES);
	}
	public IBSPage(Integer pageNum, Integer pageSize) {
		initPage(pageNum, pageSize,Constant.DEAFULT_PAGE_NAVIGATEPAGES);
	}
	public IBSPage(Integer pageNum, Integer pageSize,int navigatePages) {
		initPage(pageNum, pageSize,navigatePages);
	}
	private void initPage(Integer pageNum, Integer pageSize,int navigatePages ) {
     this.pageNum=pageNum;
     this.pageSize=pageSize;
     this.navigatePages=navigatePages;
	}
	
	public RowBounds getRowBounds() {
		return new RowBounds(this.pageNum,this.pageSize);
	}
}
